//
//  ContrastConfigCell.swift
//  ChanMaMa
//
//  Created by 戴泉明 on 2021/4/21.
//  Copyright © 2021 蝉妈妈-戴泉明. All rights reserved.
//

import UIKit

class ContrastConfigCell: UITableViewCell {
    
    var titleLabel = UILabel()

    class func cellWithTableView(tableView:UITableView) -> ContrastConfigCell {
        let id:String = "ContrastConfigCell"
        var cell = tableView.dequeueReusableCell(withIdentifier: id) as? ContrastConfigCell
        if  cell == nil {
            cell = ContrastConfigCell()
            cell!.backgroundColor = UIColor.clear
            cell!.addSubview(cell!.titleLabel)
            cell!.titleLabel.snp.makeConstraints { (make) in
                make.left.top.bottom.equalTo(cell!)
                make.width.equalTo(CONTRAST_CONFIG_WIDTH)
            }
            cell!.titleLabel.backgroundColor = UIColor.init(ts_hexString: "f5f6f7")
            cell!.titleLabel.textColor = UIColor.init(ts_hexString: "#202629")
            cell!.titleLabel.font = UIFont.systemFont(ofSize: 12)
            cell!.titleLabel.textAlignment = .center
            cell!.titleLabel.numberOfLines = 0
            cell!.titleLabel.layer.borderWidth = 0.5
            cell!.titleLabel.layer.borderColor = UIColor.init(ts_hexString: "#E3E4E5").cgColor
        }
        cell?.selectionStyle = .none
        return cell ?? ContrastConfigCell()
    }
}
